<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'contact.label', default: 'Contact')}"/>
    <title>新增客户</title>
    <style>
        .positionStyle .control-label{
            text-align: left;
        }
        .positionStyle1 .control-label{
            text-align: right;
            padding-top: 8px;
        }
        .text-left{
            text-align: left!important;
        }
        .text-right{
            text-align: right!important;
        }
        .form-controls{
            display: inline;
            width:90px;
            height: 34px;
            padding: 6px 12px;
            font-size: 14px;
            line-height: 1.42857143;
            color: #555;
            background-color: #fff;
            background-image: none;
            border: 1px solid #ccc;
            border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
            -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
            border-color: #eaeaea !important;
        }
        .textMargin{
            margin-top: 8px;
        }
    </style>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>PLS CINDATA</li>
                    <li>
                        <g:link controller="menu" action="index">CINDATA</g:link>
                    </li>
                    <li class="active">
                        <span>新增客户</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                新增客户
            </h2>
        </div>
    </div>
</div>


<g:if test="${flash.message}">
    <div class="message alert alert-info" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${this.menu}">
    <ul class="errors" role="alert">
        <g:eachError bean="${this.menu}" var="error">
            <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                    error="${error}"/></li>
        </g:eachError>
    </ul>
</g:hasErrors>


<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                新增客户
            </div>

            <div class="panel-body form-horizontal positionStyle">

                <div class="form-group">
                    <label class="control-label">2.客户资信状况</label>
                </div>
                <div class="form-group">
                    <label class="control-label">（一） 借款人、配偶及共同借款人的信用记录查询</label>
                </div>
                <form class="financialLoanSave">
                    <input type="hidden" name="reportId" value="${this.contactSurveyReport?.id}" >
                    <input type="hidden" name="contactId1" value="${this.contactSurvey?.id}" >
                    <input type="hidden" name="contactId2" value="${this.contactSurvey2?.id}" >
                        <div class="form-group ">
                            <label class="col-md-2 control-label text-right">项目/被查询人:</label>
                            <label class="col-md-4 control-label" style="text-align: center">借款人1</label>
                            <g:if test="${this.contactSurvey?.maritalStatus== "已婚" || this.contactSurvey?.maritalStatus== "再婚"}">
                                <label class="col-md-6 control-label" style="text-align: center">配偶</label>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">征信逾期记录:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditOverdueRecord.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditOverdueRecord1" value="${it}" checked="${contactSurvey?.creditOverdueRecord == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey?.maritalStatus== "已婚" || this.contactSurvey?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditOverdueRecord.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditOverdueRecord1" value="${it}" checked="${contactSurvey?.spouseCreditOverdueRecord == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">征信主要违约记录:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditDefaultingRecord.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditDefaultingRecord1" value="${it}" checked="${contactSurvey?.creditDefaultingRecord == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey?.maritalStatus== "已婚" || this.contactSurvey?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1" id="spouseCreditDefaultingRecord">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditDefaultingRecord.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditDefaultingRecord1" value="${it}" checked="${contactSurvey?.spouseCreditDefaultingRecord == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">近半年征信查询次数:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditSearchingTimesInHalfYear.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditSearchingTimesInHalfYear1" value="${it}" checked="${contactSurvey?.creditSearchingTimesInHalfYear == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey?.maritalStatus== "已婚" || this.contactSurvey?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1" id="spouseCreditSearchingTimesInHalfYear">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditSearchingTimesInHalfYear.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditSearchingTimesInHalfYear1" value="${it}" checked="${contactSurvey?.spouseCreditSearchingTimesInHalfYear == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                    <g:if test="${this.contactSurvey2}">
                        <div class="form-group"><hr style="border:0.5px dashed"></div>
                        <div class="form-group ">
                            <label class="col-md-2 control-label text-right">项目/被查询人:</label>
                            <label class="col-md-4 control-label" style="text-align: center">借款人2</label>
                            <g:if test="${this.contactSurvey2?.maritalStatus== "已婚" || this.contactSurvey2?.maritalStatus== "再婚"}">
                                <label class="col-md-6 control-label" style="text-align: center">配偶</label>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">征信逾期记录:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditOverdueRecord.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditOverdueRecord2" value="${it}" checked="${contactSurvey2?.creditOverdueRecord == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey2?.maritalStatus== "已婚" || this.contactSurvey2?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditOverdueRecord.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditOverdueRecord2" value="${it}" checked="${contactSurvey2?.spouseCreditOverdueRecord == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">征信主要违约记录:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditDefaultingRecord.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditDefaultingRecord2" value="${it}" checked="${contactSurvey2?.creditDefaultingRecord == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey2?.maritalStatus== "已婚" || this.contactSurvey2?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditDefaultingRecord.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditDefaultingRecord2" value="${it}" checked="${contactSurvey2?.spouseCreditDefaultingRecord == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required text-right">近半年征信查询次数:</label>
                            <div class="col-md-4">
                                <g:each in="${com.cindata.ContactSurvey.constrainedProperties.creditSearchingTimesInHalfYear.inList}">
                                    <div class="col-md-3 control-label">
                                        <g:radio name="creditSearchingTimesInHalfYear2" value="${it}" checked="${contactSurvey2?.creditSearchingTimesInHalfYear == it}"/>${it}
                                    </div>
                                </g:each>
                            </div>
                            <g:if test="${this.contactSurvey2?.maritalStatus== "已婚" || this.contactSurvey2?.maritalStatus== "再婚"}">
                                <div class="col-md-4 col-md-offset-1">
                                    <g:each in="${com.cindata.ContactSurvey.constrainedProperties.spouseCreditSearchingTimesInHalfYear.inList}">
                                        <div class="col-md-3 control-label">
                                            <g:radio name="spouseCreditSearchingTimesInHalfYear2" value="${it}" checked="${contactSurvey2?.spouseCreditSearchingTimesInHalfYear == it}"/>${it}
                                        </div>
                                    </g:each>
                                </div>
                            </g:if>
                        </div>
                        </div>
                    </g:if>

                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="create" value="保存" id="creditReport"/>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="row" id="second">
        <div class="hpanel hgreen">
            <div class="panel-body positionStyle1">
                <div class="form-group">
                    <label class="control-label">（二） 借款人、配偶及共同借款人原有负债情况</label>
                </div>
                <div class="form-group">
                    <label class="control-label">金融机构原有贷款</label>
                </div>
                %{--<g:form action="save">--}%
                    <div class="row">
                        <div class="form-group">
                            <div class="control-label text-left" style="margin-left: 4%">
                                <label class="control-label">借款人1</label>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">负债类型</label>
                            <div class="col-md-2" style="margin-top: 8px;" >
                                <input type="text" value="其他金融机构原有贷款" style="border: none" name="debtType1" id="debtType" value="${contactSurvey?.debtType}"/>
                            </div>
                            <label class="col-md-1 control-label">笔数:</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control inputMargin" type="text" name="debtMount1"  value="${this.contactSurvey?.debtMount}" id="debtMount" placeholder="请输入数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                            <label class="col-md-1 control-label">结余金额：</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="loansBalance1"   value="${this.contactSurvey?.loansBalance}" id="loansBalance" placeholder="请输入数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                        </div>

                        <div class="clearfix"></div>

                        <div class="form-group ">
                            <label class="col-md-2 control-label">月均还款额:</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="repaymentMountPerMon1"   value="${this.contactSurvey?.repaymentMountPerMon}" id="repaymentMountPerMon" placeholder="请输入数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                            <label class="col-md-1 control-label">备注:</label>
                            <div class="col-md-3">
                                <textarea class="form-control" placeholder="请填写备注" name="memo1" value="${this.contactSurvey?.memo}" id="memo">${this.contactSurvey?.memo}</textarea>
                            </div>
                        </div>
                    </div>

                    <g:if test="${this.contactSurvey2}">
                        <div class="row">
                            <div class="form-group">
                                <div class="control-label text-left" style="margin-left: 4%;">
                                    <label class="control-label">借款人2</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">负债类型</label>
                                <div class="col-md-2" style="margin-top: 8px;" >
                                    <input type="text" value="其他金融机构原有贷款" style="border: none" name="debtType2" id="debtType2" value="${this.contactSurvey2?.debtType}"/>
                                </div>
                                <label class="col-md-1 control-label">笔数:</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control inputMargin" type="text" name="debtMount2" id="debtMount2"  value="${this.contactSurvey2?.debtMount}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                                <label class="col-md-1 control-label">结余金额：</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="loansBalance2" id="loansBalance2"  value="${this.contactSurvey2?.loansBalance}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                            </div>

                            <div class="clearfix"></div>

                            <div class="form-group ">
                                <label class="col-md-2 control-label ">月均还款额:</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="repaymentMountPerMon2" id="repaymentMountPerMon2"  value="${this.contactSurvey2?.repaymentMountPerMon}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                                <label class="col-md-1 control-label">备注:</label>
                                <div class="col-md-3">
                                    <textarea class="form-control" placeholder="请填写备注" name="memo2" id="memo2" value="${this.contactSurvey2?.memo}">${this.contactSurvey2?.memo}</textarea>
                                </div>
                            </div>
                        </div>
                    </g:if>


                    <div class="form-group">
                        <div class="col-md-2 control-label">
                            <label class="control-label">借款人1:</label>
                        </div>
                        <div class="col-md-8" >
                            <label class="control-label">信用卡透支金额 <input type="text" class="form-controls" placeholder="请输入数字" name="overdraftAmount1" id="overdraftAmount" value="${this.contactSurvey?.overdraftAmount}"> 元，为他人债务担保余额合计 <input type="text" class="form-controls" placeholder="请输入数字" name="guaranteeForOthersAmount1" id="guaranteeForOthersAmount" value="${this.contactSurvey?.guaranteeForOthersAmount}"> 元</label>
                        </div>
                    </div>
                    <g:if test="${this.contactSurvey2}">
                        <div class="clearfix"></div>

                        <div class="form-group">
                            <lable class="col-md-2 control-label">
                                <label class="control-label">借款人2:</label>
                            </lable>
                            <div class="col-md-8" >
                                <label class="control-label" style="" >信用卡透支金额 <input type="text" class="form-controls" placeholder="请输入数字" name="overdraftAmount2" id="overdraftAmount2" value="${this.contactSurvey2?.overdraftAmount}"> 元，为他人债务担保余额合计 <input type="text" class="form-controls" placeholder="请输入数字" name="guaranteeForOthersAmount2" id="guaranteeForOthersAmount2" value="${this.contactSurvey2?.guaranteeForOthersAmount}"> 元</label>
                            </div>
                        </div>
                    </g:if>
                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="create2" value="保存" id="originalDebt"/>
                        </div>
                    </div>
                %{--</g:form>--}%
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-body form-horizontal">
                <div class="panel-heading">
                    （三） 家庭成员收入能力检查记录
                </div>
                <g:form action="createClientCollateralPurchase">
                    <input type="hidden" name="reportId" value="${this.contactSurveyReport?.id}" id="reportId">
                    <input type="hidden" name="contactId1" value="${this.contactSurvey?.id}" id="contactId">
                    <input type="hidden" name="contactId2" value="${this.contactSurvey2?.id}" id="contactId2">
                    <div class="row">
                        <div class="panel-heading">
                            借款人1
                        </div>
                        <div class="panel-heading">
                            (1)单位核查
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">单位名称:</label>
                            <div class="col-md-8">
                                <g:textField class="form-control" type="text" name="workUnitName1"  value="${this.contactSurvey?.workUnitName}" placeholder="请填写单位名称"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">单位地址:</label>
                            <div class="col-md-8">
                                <g:textField class="form-control" type="text" name="workUnitAddress1"   value="${this.contactSurvey?.workUnitAddress}" placeholder="请填写单位地址"/>
                            </div>
                        </div>

                        <div class="form-group ">
                            <label class="col-md-2 control-label is-required">单位性质</label>
                            <div class="col-md-6">
                                <g:each in="${com.cindata.dictionary.OrganizationNatureDict.list()}">
                                    <div class="radio radio-info radio-inline">
                                        <g:radio name="workUnitNature1" value="${it?.id}" checked="${contactSurvey?.workUnitNature?.id == it?.id}" />
                                        <label>${it?.name}</label>
                                    </div>
                                </g:each>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">固定电话:</label>
                            <div class="col-md-3">
                                %{--<input type="text" class="form-controls" name="workUnitPhone1"> - <input type="text" class="form-controls" style="width: 200px" name="workUnitPhone2">--}%
                                <input type="text" class="form-controls" name="workUnitPhone1" value="${this.contactSurvey?.workUnitPhone}">
                            </div>
                            <label class="col-md-2 control-label is-required">号码验证渠道:</label>
                            <div class="col-md-3">
                                <g:textField class="form-control" type="text" name="numberCheckChannel1"   value="${this.contactSurvey?.numberCheckChannel}" placeholder="请填写号码验证 渠道"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">核查时间:</label>
                            <div class="col-md-3">
                                <div class="input-group date form_datetime">
                                    <span class="input-group-addon">
                                        <span class="fa fa-calendar"></span>
                                    </span>
                                    <input type="text" name="workUnitCheckDate1" id="workUnitCheckDate" placeholder="请填写核查时间"
                                           value="${this.contactSurvey?.workUnitCheckDate}" readonly class="form-control daily-b">
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">核查提问：</label>
                            <div class="col-md-5">
                                <div class="radio radio-info radio-inline">
                                    <g:radio name="checkContent1" value="是否本单位职工" checked="${contactSurvey?.checkContent == '是否本单位职工'}"/>
                                    <label for="sex1">是否本单位职工</label>
                                </div>
                                <div class="radio radio-info radio-inline ">
                                    <g:radio name="checkContent1" value="职工个人情况是否吻合" checked="${contactSurvey?.checkContent == '职工个人情况是否吻合'}"/>
                                    <label for="sex2">职工个人情况是否吻合</label>
                                </div>
                                <div class="radio radio-info radio-inline ">
                                    <g:radio name="checkContent1" value="员工缴存情况是否与系统对应" checked="${contactSurvey?.checkContent == '员工缴存情况是否与系统对应'}"/>
                                    <label for="sex2">员工缴存情况是否与系统对应</label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">接听人员:</label>
                            <div class="col-md-3">
                                <g:textField class="form-control" type="text" name="checkReceiver1"   value="${this.contactSurvey?.checkReceiver}" placeholder="请输入接听人员姓名"/>
                            </div>
                            <label class="col-md-2 control-label is-required">身份:</label>
                            <div class="col-md-5">
                                <div class="radio radio-info radio-inline">
                                    <g:radio name="checkReceiverIdentity1" value="人事/劳资" checked="${contactSurvey?.checkReceiverIdentity == '人事/劳资'}"/>
                                    <label>人事/劳资</label>
                                </div>
                                <div class="radio radio-info radio-inline ">
                                    <g:radio name="checkReceiverIdentity1" value="综合办公" checked="${contactSurvey?.checkReceiverIdentity == '综合办公'}"/>
                                    <label>综合办公</label>
                                </div>
                                <div class="radio radio-info radio-inline ">
                                    <g:radio name="checkReceiverIdentity1" value="其他" checked="${contactSurvey?.checkReceiverIdentity == '其他'}"/>
                                    <label >其他</label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">单位人员答复情况:</label>
                            <div class="col-md-6">
                                <div class="radio radio-info radio-inline">
                                    <g:radio value="核实无误" name="answeredSituation1" checked="${contactSurvey?.answeredSituation == '核实无误'}"/>
                                    <label>核实无误</label>
                                </div>
                                <div class="radio radio-info radio-inline ">
                                    <g:radio value="异常" name="answeredSituation1" checked="${contactSurvey?.answeredSituation == '异常'}"/>
                                    <label>异常（请写明情况）</label>
                                </div>
                                <input type="text" class="form-controls" name="abnormalMeno1" id="abnormalMeno1" value="${this.contactSurvey?.abnormalMeno}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">工作单位实地核实情况(可选填):</label>
                            <div class="col-md-3">
                                <g:textField class="form-control" type="text" name="actuallyCheckSituation1"   value="${this.contactSurvey?.actuallyCheckSituation}" placeholder="工作单位实地核实情况"/>
                            </div>
                        </div>

                        <div class="panel-heading">
                            (2)公积金缴存情况
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">起始月份：</label>
                            <div class="col-md-2">
                                <div class="input-group date form_datetime">
                                    <span class="input-group-addon">
                                        <span class="fa fa-calendar"></span>
                                    </span>
                                    <input type="text" name="fundDepositStartDate1" placeholder="请填写起始月份"
                                           value="${this.contactSurvey?.fundDepositStartDate}" readonly class="form-control daily-b">
                                </div>
                            </div>
                            <label class="col-md-1 control-label is-required">截止月份:</label>
                            <div class="col-md-2">
                                <div class="input-group date form_datetime">
                                    <span class="input-group-addon">
                                        <span class="fa fa-calendar"></span>
                                    </span>
                                    <input type="text" name="fundDepositEndDate1" placeholder="请填写截止月份"
                                           value="${this.contactSurvey?.fundDepositEndDate}" readonly class="form-control daily-b">
                                </div>
                            </div>
                            <label class="col-md-1 control-label is-required" style="padding-right: 0;padding-left: 0;">连续缴存期数：</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="fundDepositDuration1"   value="${this.contactSurvey?.fundDepositDuration}" placeholder="数字"/>
                                    <span class="input-group-addon">期</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">月缴额：</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="fundDepositAmountPerMon1"   value="${this.contactSurvey?.fundDepositAmountPerMon}" placeholder="请输入数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                            <label class="col-md-1 control-label is-required">缴存比例:</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="fundDepositRatio1"   value="${this.contactSurvey?.fundDepositRatio}" placeholder="请输入数字"/>
                                    <span class="input-group-addon">%</span>
                                </div>
                            </div>
                            <label class="col-md-1 control-label is-required">月缴存基数：</label>
                            <div class="col-md-2">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="text" name="fundDepositBaseAmount1"   value="${this.contactSurvey?.fundDepositBaseAmount}" placeholder="数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group ">
                            <label class="col-md-2 control-label is-required">公积金开户行:</label>
                            <div class="col-md-3">
                                <g:textField class="form-control" type="text" name="fundOpenedBank1"   value="${this.contactSurvey?.fundOpenedBank}" placeholder="请输入公积金开户行"/>
                            </div>
                            <label class="col-md-2 control-label is-required">公积金余额:</label>
                            <div class="col-md-3">
                                <div class="input-group m-b">
                                    <g:textField class="form-control" type="" name="fundBalance1" id="fundBalance"  value="${this.contactSurvey?.fundBalance}" placeholder="数字"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group ">
                            <label class="col-md-2 control-label is-required">公积金缴存账号:</label>
                            <div class="col-md-3">
                                <g:textField class="form-control" type="text" name="fundAccount1"  id="fundAccount" value="${this.contactSurvey?.fundAccount}" placeholder="请输入公积金缴存账号"/>
                            </div>
                        </div>
                    </div>

                    <g:if test="${this.contactSurvey2}">
                        <div class="row">
                            <div class="panel-heading">
                                借款人2
                            </div>
                            <div class="panel-heading">
                                (1)单位核查
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">单位名称:</label>
                                <div class="col-md-8">
                                    <g:textField class="form-control" type="text" name="workUnitName2"  value="${this.contactSurvey2?.workUnitName}" placeholder="请填写单位名称"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">单位地址:</label>
                                <div class="col-md-8">
                                    <g:textField class="form-control" type="text" name="workUnitAddress2"   value="${this.contactSurvey2?.workUnitAddress}" placeholder="请填写单位地址"/>
                                </div>
                            </div>

                            <div class="form-group ">
                                <label class="col-md-2 control-label is-required">单位性质</label>
                                <div class="col-md-6">
                                    <g:each in="${com.cindata.dictionary.OrganizationNatureDict.list()}">
                                        <div class="radio radio-info radio-inline">
                                            <g:radio name="workUnitNature2" value="${it?.id}" checked="${contactSurvey2?.workUnitNature?.id == it?.id}" />
                                            <label>${it?.name}</label>
                                        </div>
                                    </g:each>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">固定电话:</label>
                                <div class="col-md-3">
                                    %{--<input type="text" class="form-controls" name="workUnitPhone1"> - <input type="text" class="form-controls" style="width: 200px" name="workUnitPhone2">--}%
                                    <input type="text" class="form-controls" name="workUnitPhone2" value="${this.contactSurvey2?.workUnitPhone}">
                                </div>
                                <label class="col-md-2 control-label is-required">号码验证渠道:</label>
                                <div class="col-md-3">
                                    <g:textField class="form-control" type="text" name="numberCheckChannel2"   value="${this.contactSurvey2?.numberCheckChannel}" placeholder="请填写号码验证 渠道"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">核查时间:</label>
                                <div class="col-md-3">
                                    <div class="input-group date form_datetime">
                                        <span class="input-group-addon">
                                            <span class="fa fa-calendar"></span>
                                        </span>
                                        <input type="text" name="workUnitCheckDate2" id="workUnitCheckDate2" placeholder="请填写核查时间"
                                               value="${this.contactSurvey2?.workUnitCheckDate}" readonly class="form-control daily-b">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">核查提问：</label>
                                <div class="col-md-5">
                                    <div class="radio radio-info radio-inline">
                                        <g:radio name="checkContent2" value="是否本单位职工" checked="${contactSurvey2?.checkContent == '是否本单位职工'}"/>
                                        <label for="sex1">是否本单位职工</label>
                                    </div>
                                    <div class="radio radio-info radio-inline ">
                                        <g:radio name="checkContent2" value="职工个人情况是否吻合" checked="${contactSurvey2?.checkContent == '职工个人情况是否吻合'}"/>
                                        <label for="sex2">职工个人情况是否吻合</label>
                                    </div>
                                    <div class="radio radio-info radio-inline ">
                                        <g:radio name="checkContent2" value="员工缴存情况是否与系统对应" checked="${contactSurvey2?.checkContent == '员工缴存情况是否与系统对应'}"/>
                                        <label for="sex2">员工缴存情况是否与系统对应</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">接听人员:</label>
                                <div class="col-md-3">
                                    <g:textField class="form-control" type="text" name="checkReceiver2"   value="${this.contactSurvey2?.checkReceiver}" placeholder="请输入接听人员姓名"/>
                                </div>
                                <label class="col-md-2 control-label is-required">身份:</label>
                                <div class="col-md-5">
                                    <div class="radio radio-info radio-inline">
                                        <g:radio name="checkReceiverIdentity2" value="人事/劳资" checked="${contactSurvey2?.checkReceiverIdentity == '人事/劳资'}"/>
                                        <label>人事/劳资</label>
                                    </div>
                                    <div class="radio radio-info radio-inline ">
                                        <g:radio name="checkReceiverIdentity2" value="综合办公" checked="${contactSurvey2?.checkReceiverIdentity == '综合办公'}"/>
                                        <label>综合办公</label>
                                    </div>
                                    <div class="radio radio-info radio-inline ">
                                        <g:radio name="checkReceiverIdentity2" value="其他" checked="${contactSurvey2?.checkReceiverIdentity == '其他'}"/>
                                        <label >其他</label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">单位人员答复情况:</label>
                                <div class="col-md-6">
                                    <div class="radio radio-info radio-inline">
                                        <g:radio value="核实无误" name="answeredSituation2" checked="${contactSurvey2?.answeredSituation == '核实无误'}"/>
                                        <label>核实无误</label>
                                    </div>
                                    <div class="radio radio-info radio-inline ">
                                        <g:radio value="异常" name="answeredSituation2" checked="${contactSurvey2?.answeredSituation == '异常'}"/>
                                        <label>异常（请写明情况）</label>
                                    </div>
                                    <input type="text" class="form-controls" name="abnormalMeno2" id="abnormalMeno2" value="${this.contactSurvey2?.abnormalMeno}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">工作单位实地核实情况(可选填):</label>
                                <div class="col-md-3">
                                    <g:textField class="form-control" type="text" name="actuallyCheckSituation2"   value="${this.contactSurvey2?.actuallyCheckSituation}" placeholder="工作单位实地核实情况"/>
                                </div>
                            </div>

                            <div class="panel-heading">
                                (2)公积金缴存情况
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">起始月份：</label>
                                <div class="col-md-2">
                                    <div class="input-group date form_datetime">
                                        <span class="input-group-addon">
                                            <span class="fa fa-calendar"></span>
                                        </span>
                                        <input type="text" name="fundDepositStartDate2" placeholder="请填写起始月份"
                                               value="${this.contactSurvey2?.fundDepositStartDate}" readonly class="form-control daily-b">
                                    </div>
                                </div>
                                <label class="col-md-1 control-label is-required">截止月份:</label>
                                <div class="col-md-2">
                                    <div class="input-group date form_datetime">
                                        <span class="input-group-addon">
                                            <span class="fa fa-calendar"></span>
                                        </span>
                                        <input type="text" name="fundDepositEndDate2" placeholder="请填写截止月份"
                                               value="${this.contactSurvey2?.fundDepositEndDate}" readonly class="form-control daily-b">
                                    </div>
                                </div>
                                <label class="col-md-1 control-label is-required" style="padding-right: 0;padding-left: 0;">连续缴存期数：</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="fundDepositDuration2"   value="${this.contactSurvey2?.fundDepositDuration}" placeholder="数字"/>
                                        <span class="input-group-addon">期</span>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label is-required">月缴额：</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="fundDepositAmountPerMon2"   value="${this.contactSurvey2?.fundDepositAmountPerMon}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                                <label class="col-md-1 control-label is-required">缴存比例:</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="fundDepositRatio2"   value="${this.contactSurvey2?.fundDepositRatio}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">%</span>
                                    </div>
                                </div>
                                <label class="col-md-1 control-label is-required">月缴存基数：</label>
                                <div class="col-md-2">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="fundDepositBaseAmount2"   value="${this.contactSurvey2?.fundDepositBaseAmount}" placeholder="数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group ">
                                <label class="col-md-2 control-label is-required">公积金开户行:</label>
                                <div class="col-md-3">
                                    <g:textField class="form-control" type="text" name="fundOpenedBank2"   value="${this.contactSurvey2?.fundOpenedBank}" placeholder="请输入公积金开户行"/>
                                </div>
                                <label class="col-md-2 control-label is-required">公积金余额:</label>
                                <div class="col-md-3">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="" name="fundBalance2" id="fundBalance2"  value="${this.contactSurvey2?.fundBalance}" placeholder="数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group ">
                                <label class="col-md-2 control-label is-required">公积金缴存账号:</label>
                                <div class="col-md-3">
                                    <g:textField class="form-control" type="text" name="fundAccount2"  id="fundAccount2" value="${this.contactSurvey2?.fundAccount}" placeholder="请输入公积金缴存账号"/>
                                </div>
                            </div>
                        </div>
                    </g:if>

                    <div class="row">
                        <strong>注：对外企、民企性质的单位职工，必须电话核实借款人的工作情况</strong>
                        <div>
                            根据上表核定:
                            <div class="form-group ">
                                <label class="col-md-2 control-label is-required">认定借款人1月均总收入:</label>
                                <div class="col-md-3">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="text" name="monthlyTotalIncome"   value="${this.contactSurvey?.monthlyTotalIncome}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                            </div>
                            <g:if test="${this.contactSurvey2}">
                                <div class="form-group ">
                                    <label class="col-md-2 control-label is-required">认定借款人2月均总收入:</label>
                                    <div class="col-md-3">
                                        <div class="input-group m-b">
                                            <g:textField class="form-control" type="text" name="monthlyTotalIncome2"  value="${this.contactSurvey2?.monthlyTotalIncome}" placeholder="请输入数字"/>
                                            <span class="input-group-addon">元</span>
                                        </div>
                                    </div>
                                </div>
                            </g:if>
                        </div>
                        <div>
                            综上核定：
                            <div class="form-group ">
                                <label class="col-md-2 control-label is-required">借款人、配偶及共同借款人合计税后收入月均:</label>
                                <div class="col-md-3">
                                    <div class="input-group m-b">
                                        <g:textField class="form-control" type="" name="coOwnersMonTotalIncome"   value="${this.contactSurveyReport?.coOwnersMonTotalIncome}" placeholder="请输入数字"/>
                                        <span class="input-group-addon">元</span>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="create3" value="下一步"/>
                            <button type="button" class="btn cancelButton" style="margin-left: 20px;">取消</button>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>



</div>
<g:javascript>


    $("#creditReport").click(function () {
        // var creditOverdueRecord=$("#creditOverdueRecord input[name=creditOverdueRecord]:checked").val()
        var data=$(".financialLoanSave").serialize()
        console.log(data)
        $.ajax({
            url: "/contact/financialLoanSave",
            type: "POST",
            data:data,
            success: function(result){
                if(result.status=="success"){
                    swal("保存成功", "", "success");
                    // console.log(" 借款人、配偶及共同借款人的信用记录 保存成功")
                }else{
                    console.log(" 借款人、配偶及共同借款人的信用记录 保存失败")
                }

            }
        });
    })

    $("#originalDebt").click(function () {
        var debtType=$("#debtType").val()
        var debtMount=$("#debtMount").val()
        var loansBalance=$("#loansBalance").val()
        var repaymentMountPerMon=$("#repaymentMountPerMon").val()
        var memo=$("#memo").val()
        var overdraftAmount=$("#overdraftAmount").val()
        var guaranteeForOthersAmount=$("#guaranteeForOthersAmount").val()

        var debtType2=$("#debtType2").val()
        var debtMount2=$("#debtMount2").val()
        var loansBalance2=$("#loansBalance2").val()
        var repaymentMountPerMon2=$("#repaymentMountPerMon2").val()
        var memo2=$("#memo2").val()
        var overdraftAmount2=$("#overdraftAmount2").val()
        var guaranteeForOthersAmount2=$("#guaranteeForOthersAmount2").val()
        var contactId=$("#contactId").val()
        var contactId2=$("#contactId2").val()
        $.ajax({
            url: "/contact/originalDebtSave",
            type: "POST",
            data: {
                'contactId1': contactId,
                'contactId2': contactId2,
                'debtType1': debtType,
                'debtMount1': debtMount,
                'loansBalance1': loansBalance,
                'repaymentMountPerMon1': repaymentMountPerMon,
                'memo1': memo,
                'overdraftAmount1':overdraftAmount,
                'guaranteeForOthersAmount1': guaranteeForOthersAmount,
                'debtType2': debtType2,
                'debtMount2': debtMount2,
                'loansBalance2': loansBalance2,
                'repaymentMountPerMon2': repaymentMountPerMon2,
                'memo2': memo2,
                'overdraftAmount2':overdraftAmount2,
                'guaranteeForOthersAmount2': guaranteeForOthersAmount2
            } ,
            success: function(result){
                if(result.status=="success"){
                    swal("保存成功", "", "success");
                    // console.log(" 借款人、配偶及共同借款人原有负债 保存成功")
                }else{
                    console.log(" 借款人、配偶及共同借款人原有负债 保存失败")
                }
            }
        });
    })
    // $(function () {
    //
    //     $('.datepicker1').datepicker({
    //         language: 'zh-CN',
    //         format:"yyyy-mm-dd"
    //     });
    //     $('.input-group.date').datepicker({ });
    //     $('.input-daterange').datepicker({ });
    // });
</g:javascript>
</body>
</html>
